<?php
/** 初始化项目 */
require '../../app/app.php';
/** 初始化数据库 */
use app\util\Mysql;
$database = Mysql::init();

if (isset($_POST["username"]) && isset($_POST["phone"]) && isset($_POST["email"]) &&isset($_POST["imgurl"]) ){
    $username = $_POST["username"];
    $phone = $_POST["phone"];
    $email = $_POST["email"];
    $imgurl = $_POST["imgurl"];
    $list = $database->update("user_text",["phone"=>$phone,"email"=>$email,"imgurl"=>$imgurl],["username" => $username]);
    echo $list->rowCount();
}
?>